Conventionally, there have been proposed apparatuses and the like performing information processing in which a sub-character follows a leader character, or a plurality of characters move in a group.
In this respect, there have been proposed various methods of avoiding an obstacle such as a terrain when the characters are blocked by the obstacle and cannot move.
The present application was made to solve the problem as described above, and an object of the present application is to provide a non-transitory storage medium encoded with a computer-readable information processing program capable of further increasing interest of data communication, an information processing apparatus, a method of controlling the information processing apparatus, and an information processing system.
An exemplary embodiment provides a non-transitory storage medium encoded with a computer-readable information processing program for performing information processing in which a first object moves and at least one second object moves in accordance with the movement of the first object in virtual space, the information processing program being executable by a computer of an information processing apparatus, the information processing program being configured to cause the computer to function as an input acceptance unit for accepting an input, a first object movement control unit for performing movement control of the first object in the virtual space based on the input to the input acceptance unit, a range calculation unit for calculating a movable range where the second object can move in the virtual space, based on a position of the first object moved by the first object movement control unit, and a second object movement control unit for performing movement control of the second object based on the movable range calculated by the range calculation unit.
In the exemplary embodiment, the range calculation unit may repeatedly calculate the movable range.
In the exemplary embodiment, the range calculation unit may calculate a region formed based on the repeatedly calculated movable ranges as a new movable range.
In the exemplary embodiment, the second object movement control unit may perform movement control of the second object, by setting the newly calculated movable range as a movement target.
In the exemplary embodiment, the second object movement control unit may perform movement control of the second object, by setting a subsequent movable range in chronological order among the newly calculated movable ranges as a movement target.
In the exemplary embodiment, the second object movement control unit may perform movement control of the second object, by setting a movable range closer than a subsequent movable range in chronological order among the newly calculated movable ranges as a movement target.
In the exemplary embodiment, the second object movement control unit may perform movement control of the second object, by setting the movement target on a position on the subsequent movable range based on a position on the movable range passed lastly by the second object.
In the exemplary embodiment, the second object movement control unit may perform movement control of the second object, by setting the movement target on the position on the subsequent movable range based on the position on the movable range passed lastly by the second object with reference to a predetermined position, and the predetermined position on the subsequent movable range.
In the exemplary embodiment, the movable range may be a range based on a direction of movement of the first object.
In the exemplary embodiment, the second object movement control unit may perform movement control of the second object, by setting the movable range as a movement target.
In the exemplary embodiment, the second object movement control unit may perform movement control of the second object, by setting movement target coordinates based on a position of the first object.
In the exemplary embodiment, the movable range may be a range including a position of the first object.
In the exemplary embodiment, the second object movement control unit may perform movement control of the second object within a safe region formed based on a plurality of the movable ranges calculated by the range calculation unit.
In the exemplary embodiment, the movable range may be variable in size based on a range where the second object can move in the virtual space.
In the exemplary embodiment, the non-transitory storage medium may further include region information for defining a region where the second object can move and a region where the second object cannot move in the virtual space, and the range calculation unit may calculate the movable range of the second object by referring to the region information.
In the exemplary embodiment, the region information may be defined in accordance with a position and a height in the virtual space, and the range calculation unit may calculate the movable range of the second object based on a position and a height of the first object in the virtual space by referring to the region information.
In the exemplary embodiment, an attribute of a region may be set in the virtual space, and the second object movement control unit may perform movement control of the second object based on the attribute of the region.
In the exemplary embodiment, the second object may be provided with a movement attribute about a manner in which the second object moves, and the range calculation unit may calculate the movable range based on the position of the first object moved by the first object movement control unit and the movement attribute.
An exemplary embodiment provides a method of controlling an information processing apparatus performing information processing in which a first object moves and at least one second object moves in accordance with the movement of the first object in virtual space, the method including the steps of accepting an input, performing movement control of the first object in the virtual space based on the input, calculating a movable range where the second object can move in the virtual space based on a position of the moved first object, and performing movement control of the second object based on the calculated movable range.
An exemplary embodiment provides an information processing apparatus performing information processing in which a first object moves and at least one second object moves in accordance with the movement of the first object in virtual space, the information processing apparatus including an input acceptance unit for accepting an input, a first object movement control module for performing movement control of the first object in the virtual space based on the input to the input acceptance unit, a range calculation module for calculating a movable range where the second object can move in the virtual space based on a position of the first object moved by the first object movement control module, and a second object movement control module for performing movement control of the second object based on the movable range calculated by the range calculation module.
An exemplary embodiment provides an information processing system including an information processing apparatus performing information processing in which a first object moves and at least one second object moves in accordance with the movement of the first object in virtual space, the information processing system including an input acceptance unit for accepting an input, a first object movement control module for performing movement control of the first object in the virtual space based on the input to the input acceptance unit, a range calculation module for calculating a movable range where the second object can move in the virtual space based on a position of the first object moved by the first object movement control module, and a second object movement control module for performing movement control of the second object based on the movable range calculated by the range calculation module.
According to the exemplary embodiments, interest of data communication can be increased.
The foregoing and other objects, features, aspects and advantages of the exemplary embodiments will become more apparent from the following detailed description of the exemplary embodiments when taken in conjunction with the accompanying drawings.